/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package bgu.sonar.util.ui.visual;

import java.awt.Image;

/**
 *
 * @author bennyl
 */
public class VisualWrapper<T> implements HasVisualData {

    private T wrapee;
    private HasVisualData delegate;

    public VisualWrapper(T wrapee) {
        this.wrapee = wrapee;
        delegate = VisualData.Support.extract(wrapee);
    }

    public T getWrapee() {
        return wrapee;
    }

    @Override
    public String toString() {
        return delegate.getVisualName();
    }

    @Override
    public String getVisualName() {
        return delegate.getVisualName();
    }

    @Override
    public Image getIcon() {
        return delegate.getIcon();
    }

    @Override
    public String getDescription() {
        return "";
    }
}
